{% extends 'base.html' %}

{% block title %}
    新闻管理
{% endblock %}

{% block content %}
    <!-- Page Content -->
    <div id="page-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">
                        {{ dep }}-人员管理
                    </h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="row">
                        <from class="col-lg-9">
                            <span class="span1" style="font-size: 20px">请选择工会名称：</span>
                            {#实现选中跳转对应的界面，逐级跳转#}

                            <select id="select_1" name="s1" onchange="window.location=this.value;" class="form-control-static">

                                <option value="">--请选择工会--</option>
                                {% for d in department_list %}

                                <option value="/p_list/{{ d }}/1/">{{d}}</option>

                                {% endfor %}
                            </select>

                            <select id="select_1" name="s1" onchange="window.location=this.value;" class="form-control-static">
                                {#<select id="select_1" name="s1" onchange="doSubmit(this.val);">#}
                                <option value="">--请选择性别--</option>

                            </select>

                            <select id="select_1" name="s1" onchange="window.location=this.value;" class="form-control-static">
                                {#<select id="select_1" name="s1" onchange="doSubmit(this.val);">#}
                                <option value="">--请选择地址--</option>

                            </select>

                        </from>

                            {#进行输入框筛选#}

                            <form role="form" class="col-lg-3" method="get" action="/p_list/{{ request.args.get("person_username")}}/1">
                                <div class="form-group input-group">
{#                                    <input type="hidden" name="department_id" value="">#}
                                    <input id="na" type="text" name="person_username" class="form-control" placeholder="输入要搜索的玩家的名字"
                                           value="">
                                    <span class="input-group-btn">

                                        <button class="btn btn-default" type="submit" id="btn">

                                            <i class="fa fa-search"></i>
                                        </button>
                                    </span>
                                </div>
                            </form>


                        <table class="table">
                            <thead>
                            <tr>
                                <th>id</th>
                                <th>姓名</th>
                                <th>性别</th>
                                <th>年龄</th>
                                <th>所属公会</th>
                                <th>角色总战力</th>
                                <th>地址</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for p in person_list %}
                                <tr>
                                    <td>{{ p.id }}</td>
                                    <td>{{ p.name }}</td>
                                    <td>{{ p.gender }}</td>
                                    <td>{{ p.age }}</td>
                                    <td>{{ p.departemt }}</td>
                                    <td>{{ p.ce }}</td>
                                    <td>{{ p.address }}</td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                        {#                    添加内容结束#}
{#                        <ul class="pagination pull-right">#}
{#                            {% if page %}#}
{#                                {% if page>=10 %}#}
{#                                    <li><a href="/p_list/{{ dep }}/{{ page-1 }}">上一页</a></li>#}
{#                                    {% for s in range(page-10,page+10) %}#}
{#                                        <li {% if s==page %}class="active"{% endif %}><a href="/p_list/{{ dep }}/{{ page }}">{{page}}</a></li>#}
{#                                    {% endfor %}#}
{#                                    <li><a href="/p_list/{{ dep }}/{{ page+1 }}">下一页</a></li>#}
{#                                {% endif %}#}
{#                            {% if page<10 %}#}
{#                                {% for s in range(1,25) %}#}
{#                                    <li {% if s==page %}class="active"{% endif %}><a href="/p_list/{{ dep }}/{{ page }}">{{page}}</a></li>#}
{#                                {% endfor %}#}
{#                            {% endif %}#}
{##}
{#                        </ul>#}
                    </div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
        </div>
        <!-- /.container-fluid -->
    </div>
    <!-- /#page-wrapper -->
{% endblock %}



